@extends('layouts.base')
@section('title', '|电影资源分享')
@section('keyWords','每日最新 种子 磁力链接 电驴 网盘 最新最快 双语字幕 电影剧情介绍 资源下载')
@section('description',$description)

@section('content')
    @include('movie._topHotMovies')
    <div class="well">
        <h1 class="text-center text-success lead" >电影列表&nbsp&nbsp&nbsp{{'共计'.$movies->count().'系列'}}</h1>
        <table class="table table-striped table-bordered table-condensed table-responsive">
            <thead>
            <tr >
                <th >名称</th>
                <th >资源数量</th>
                <th >用户评分</th>
                <th >更新</th>
                <th >创建</th>
            </tr>
            </thead>

            <tbody>
            @foreach($movies as $movie)
                <tr>
                    <td>
                        <span hidden>{{$movie->name_en}}</span>
                        <a href="{{route('movie.show',$movie)}}">{{$movie->full_name}}</a>
                    </td>
                    <td>
                        {{$movie->episodes->count()}}
                    </td>
                    <td >
                        {{$movie->score}}分
                    </td>
                    <td >
                        <span hidden>{{$movie->updated_at->format('m-d H:i')}}</span>{{$movie->updated_at->diffForHumans()}}
                    </td>
                    <td >
                        <span hidden>{{$movie->created_at->format('m-d H:i')}}</span>{{$movie->created_at->diffForHumans()}}
                    </td>
                </tr>

            @endforeach
            </tbody>
        </table>
    </div>


@endsection



@section('scripts')
    <script>
        $('table').bootstrapTable(
                {   "paging":true,
                    "order": [[ 3, "asec" ]]
                }
        );
        $(document).ready(function() {
            $('#slider').slick({
                dots: false,
                lazyLoad: 'ondemand',
                centerMode: true,
                slidesToShow: 3,
                autoplay: true,
                autoplaySpeed: 1000,
            });
        });

    </script>
@endsection